package com.dnndo.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * 校园新闻实体类
 */
@Data
@TableName("campusnews")
public class CampusNews {

    /**
     * 新闻ID，唯一标识
     */
    @TableId(value = "news_id")
    private Integer newsId;

    /**
     * 新闻标题
     */
    @TableField("news_title")
    private String newsTitle;

    /**
     * 学校ID
     */
    @TableField("school_id")
    private Integer schoolId;
    /**
     * 学校名称
     */
    private String schoolName;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 新闻内容
     */
    @TableField("content")
    private String content;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private Date createdAt;

    /**
     * 修改时间
     */
    @TableField("updated_at")
    private Date updatedAt;

    /**
     * 新闻图片地址
     */
    @TableField("news_url")
    private String newsUrl;

    /**
     * 点赞总数
     */
    @TableField("total_likes")
    private Long totalLikes;

    /**
     * 浏览量
     */
    @TableField("page_view")
    private Long pageView;

    @Override
    public String toString() {
        return "CampusNews{" +
                "newsId=" + newsId +
                ", newsTitle='" + newsTitle + '\'' +
                ", schoolId=" + schoolId +
                ", userId=" + userId +
                ", content='" + content + '\'' +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", newsUrl='" + newsUrl + '\'' +
                ", totalLikes=" + totalLikes +
                ", pageView=" + pageView +
                '}';
    }
}
